home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / gcc260utilsdoc.lha / gnu / man / man1 / test.1 < prev    next >
Encoding:
Text File  |  1994-07-26  |  5.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. TEST(1L)          Misc. Reference Manual Pages           TEST(1L)
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      test - check file types and compare values
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      tttteeeesssstttt [expr]
  13.      tttteeeesssstttt {--help,--version}
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      This manual page documents the GNU version  of  tttteeeesssstttt.   Note
  17.      that  most  shells  have a built-in command by the same name
  18.      and with similar functionality.
  19.  
  20.      tttteeeesssstttt returns a status of 0 (true) or 1 (false) depending  on
  21.      the  evaluation of the conditional expression _e_x_p_r.  Expres-
  22.      sions may be unary or binary.  Unary expressions  are  often
  23.      used  to  examine  the  status  of a file.  There are string
  24.      operators and numeric comparison operators as well.
  25.  
  26.      ----bbbb _f_i_l_e
  27.           True if _f_i_l_e exists and is block special.
  28.      ----cccc _f_i_l_e
  29.           True if _f_i_l_e exists and is character special.
  30.      ----dddd _f_i_l_e
  31.           True if _f_i_l_e exists and is a directory.
  32.      ----eeee _f_i_l_e
  33.           True if _f_i_l_e exists
  34.      ----ffff _f_i_l_e
  35.           True if _f_i_l_e exists and is a regular file.
  36.      ----gggg _f_i_l_e
  37.           True if _f_i_l_e exists and is set-group-id.
  38.      ----kkkk _f_i_l_e
  39.           True if _f_i_l_e has its ``sticky'' bit set.
  40.      ----LLLL _f_i_l_e
  41.           True if _f_i_l_e exists and is a symbolic link.
  42.      ----pppp _f_i_l_e
  43.           True if _f_i_l_e exists and is a named pipe.
  44.      ----rrrr _f_i_l_e
  45.           True if _f_i_l_e exists and is readable.
  46.      ----ssss _f_i_l_e
  47.           True if _f_i_l_e exists and has a size greater than zero.
  48.      ----SSSS _f_i_l_e
  49.           True if _f_i_l_e exists and is a socket.
  50.      ----tttt [[[[_f_d]]]]
  51.           True if _f_d is opened on a terminal.  If _f_d is  omitted,
  52.           it defaults to 1 (standard output).
  53.      ----uuuu _f_i_l_e
  54.           True if _f_i_l_e exists and its set-user-id bit is set.
  55.      ----wwww _f_i_l_e
  56.           True if _f_i_l_e exists and is writable.
  57.      ----xxxx _f_i_l_e
  58.           True if _f_i_l_e exists and is executable.
  59.      ----OOOO _f_i_l_e
  60.  
  61.  
  62.  
  63. FSF             Last change: GNU Shell Utilities                1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TEST(1L)          Misc. Reference Manual Pages           TEST(1L)
  71.  
  72.  
  73.  
  74.           True if _f_i_l_e exists and is owned by the effective  user
  75.           id.
  76.      ----GGGG _f_i_l_e
  77.           True if _f_i_l_e exists and is owned by the effective group
  78.           id.
  79.      _f_i_l_e_1 -nnnntttt _f_i_l_e_2
  80.           True if _f_i_l_e_1 is newer (according to modification date)
  81.           than _f_i_l_e_2.
  82.      _f_i_l_e_1 -ooootttt _f_i_l_e_2
  83.           True if _f_i_l_e_1 is older than file2.
  84.      _f_i_l_e_1 ----eeeeffff _f_i_l_e_2
  85.           True if _f_i_l_e_1 and _f_i_l_e_2 have the same device and  inode
  86.           numbers.
  87.      ----zzzz _s_t_r_i_n_g
  88.           True if the length of _s_t_r_i_n_g is zero.
  89.      ----nnnn _s_t_r_i_n_g
  90.      _s_t_r_i_n_g
  91.           True if the length of _s_t_r_i_n_g is non-zero.
  92.      _s_t_r_i_n_g_1 ==== _s_t_r_i_n_g_2
  93.           True if the strings are equal.
  94.      _s_t_r_i_n_g_1 !!!!==== _s_t_r_i_n_g_2
  95.           True if the strings are not equal.
  96.      !!!! _e_x_p_r
  97.           True if _e_x_p_r is false.
  98.      _e_x_p_r_1 -aaaa _e_x_p_r_2
  99.           True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
  100.      _e_x_p_r_1 -oooo _e_x_p_r_2
  101.           True if either _e_x_p_r_1 or _e_x_p_r_2 is true.
  102.      _a_r_g_1 OOOOPPPP _a_r_g_2
  103.           OOOOPPPP is one of ----eeeeqqqq, ----nnnneeee, ----lllltttt, ----lllleeee, ----ggggtttt, or  ---- ggggeeee.   These
  104.           arithmetic  binary  operators  return  true  if _a_r_g_1 is
  105.           equal,   not-equal,   less-than,    less-than-or-equal,
  106.           greater-than,   or   greater-than-or-equal  than  _a_r_g_2,
  107.           respectively.  _a_r_g_1 and _a_r_g_2 may be positive  integers,
  108.           negative integers, or the special expression ----llll _s_t_r_i_n_g,
  109.           which evaluates to the length of _s_t_r_i_n_g.
  110.   OOOOPPPPTTTTIIIIOOOONNNNSSSS
  111.      When GNU tttteeeesssstttt is invoked with exactly one argument, the fol-
  112.      lowing options are recognized:
  113.      --_h_e_l_p
  114.           Print a usage message on standard output and exit  suc-
  115.           cessfully.
  116.      --_v_e_r_s_i_o_n
  117.           Print version information on standard output then  exit
  118.           successfully.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. FSF             Last change: GNU Shell Utilities                2
  130.  
  131.  
  132.  
  133.